home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 November / PCWNOV07.iso / Software / Freeware / NSIS 2.29 / nsis-2.29-setup.exe / Examples / FileFuncTest.nsi < prev    next >
Encoding:
Text File  |  2006-02-10  |  13.7 KB  |  562 lines

  1. ;_____________________________________________________________________________
  2. ;
  3. ;                          File Functions Test
  4. ;_____________________________________________________________________________
  5. ;
  6. ; 2006 Shengalts Aleksander aka Instructor (Shengalts@mail.ru)
  7.  
  8. Name "File Functions Test"
  9. OutFile "FileFuncTest.exe"
  10. Caption "$(^Name)"
  11. ShowInstDetails show
  12. XPStyle on
  13.  
  14. Var FUNCTION
  15. Var OUT1
  16. Var OUT2
  17. Var OUT3
  18. Var OUT4
  19. Var OUT5
  20. Var OUT6
  21. Var OUT7
  22.  
  23. !include "FileFunc.nsh"
  24.  
  25. !insertmacro Locate
  26. !insertmacro GetSize
  27. !insertmacro DriveSpace
  28. !insertmacro GetDrives
  29. !insertmacro GetTime
  30. !insertmacro GetFileAttributes
  31. !insertmacro GetFileVersion
  32. !insertmacro GetExeName
  33. !insertmacro GetExePath
  34. !insertmacro GetParameters
  35. !insertmacro GetOptions
  36. !insertmacro GetOptionsS
  37. !insertmacro GetRoot
  38. !insertmacro GetParent
  39. !insertmacro GetFileName
  40. !insertmacro GetBaseName
  41. !insertmacro GetFileExt
  42. !insertmacro BannerTrimPath
  43. !insertmacro DirState
  44. !insertmacro RefreshShellIcons
  45.  
  46. !insertmacro un.Locate
  47. !insertmacro un.GetSize
  48. !insertmacro un.GetDrives
  49. !insertmacro un.DriveSpace
  50. !insertmacro un.GetTime
  51. !insertmacro un.GetFileAttributes
  52. !insertmacro un.GetFileVersion
  53. !insertmacro un.GetExeName
  54. !insertmacro un.GetExePath
  55. !insertmacro un.GetParameters
  56. !insertmacro un.GetOptions
  57. !insertmacro un.GetOptionsS
  58. !insertmacro un.GetRoot
  59. !insertmacro un.GetParent
  60. !insertmacro un.GetFileName
  61. !insertmacro un.GetBaseName
  62. !insertmacro un.GetFileExt
  63. !insertmacro un.BannerTrimPath
  64. !insertmacro un.DirState
  65. !insertmacro un.RefreshShellIcons
  66.  
  67.  
  68.  
  69. ;############### INSTALL ###############
  70.  
  71. !define StackVerificationStart `!insertmacro StackVerificationStart`
  72. !macro StackVerificationStart _FUNCTION
  73.     StrCpy $FUNCTION ${_FUNCTION}
  74.     Call StackVerificationStart
  75. !macroend
  76.  
  77. !define StackVerificationEnd `!insertmacro StackVerificationEnd`
  78. !macro StackVerificationEnd
  79.     Call StackVerificationEnd
  80. !macroend
  81.  
  82. Function StackVerificationStart
  83.     StrCpy $0 !0
  84.     StrCpy $1 !1
  85.     StrCpy $2 !2
  86.     StrCpy $3 !3
  87.     StrCpy $4 !4
  88.     StrCpy $5 !5
  89.     StrCpy $6 !6
  90.     StrCpy $7 !7
  91.     StrCpy $8 !8
  92.     StrCpy $9 !9
  93.     StrCpy $R0 !R0
  94.     StrCpy $R1 !R1
  95.     StrCpy $R2 !R2
  96.     StrCpy $R3 !R3
  97.     StrCpy $R4 !R4
  98.     StrCpy $R5 !R5
  99.     StrCpy $R6 !R6
  100.     StrCpy $R7 !R7
  101.     StrCpy $R8 !R8
  102.     StrCpy $R9 !R9
  103. FunctionEnd
  104.  
  105. Function StackVerificationEnd
  106.     IfErrors +3
  107.     DetailPrint 'PASSED $FUNCTION no errors'
  108.     goto +2
  109.     DetailPrint 'FAILED   $FUNCTION error'
  110.  
  111.     StrCmp $0 '!0' 0 error
  112.     StrCmp $1 '!1' 0 error
  113.     StrCmp $2 '!2' 0 error
  114.     StrCmp $3 '!3' 0 error
  115.     StrCmp $4 '!4' 0 error
  116.     StrCmp $5 '!5' 0 error
  117.     StrCmp $6 '!6' 0 error
  118.     StrCmp $7 '!7' 0 error
  119.     StrCmp $8 '!8' 0 error
  120.     StrCmp $9 '!9' 0 error
  121.     StrCmp $R0 '!R0' 0 error
  122.     StrCmp $R1 '!R1' 0 error
  123.     StrCmp $R2 '!R2' 0 error
  124.     StrCmp $R3 '!R3' 0 error
  125.     StrCmp $R4 '!R4' 0 error
  126.     StrCmp $R5 '!R5' 0 error
  127.     StrCmp $R6 '!R6' 0 error
  128.     StrCmp $R7 '!R7' 0 error
  129.     StrCmp $R8 '!R8' 0 error
  130.     StrCmp $R9 '!R9' 0 error
  131.     DetailPrint 'PASSED $FUNCTION stack'
  132.     goto end
  133.  
  134.     error:
  135.     DetailPrint 'FAILED   $FUNCTION stack'
  136. ;    MessageBox MB_OKCANCEL '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}' IDOK +2
  137. ;    quit
  138.  
  139.     end:
  140. FunctionEnd
  141.  
  142.  
  143.  
  144. Section Locate
  145.     ${StackVerificationStart} Locate
  146.  
  147.     ${Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'LocateCallback'
  148.  
  149.     ${StackVerificationEnd}
  150. SectionEnd
  151.  
  152. Function LocateCallback
  153. ;    MessageBox MB_YESNO '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}$\n$\nContinue?' IDYES +2
  154. ;    StrCpy $0 StopLocate
  155.  
  156.     Push $0
  157. FunctionEnd
  158.  
  159.  
  160. Section GetSize
  161.     ${StackVerificationStart} GetSize
  162.  
  163.     ${GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
  164.  
  165.     ${StackVerificationEnd}
  166. SectionEnd
  167.  
  168.  
  169. Section DriveSpace
  170.     ${StackVerificationStart} DriveSpace
  171.  
  172.     ${DriveSpace} 'C:\' '/D=F /S=M' $OUT1
  173.  
  174.     ${StackVerificationEnd}
  175. SectionEnd
  176.  
  177.  
  178. Section GetDrives
  179.     ${StackVerificationStart} GetDrives
  180.  
  181.     ${GetDrives} 'FDD+CDROM' 'GetDrivesCallback'
  182.  
  183.     ${StackVerificationEnd}
  184. SectionEnd
  185.  
  186. Function GetDrivesCallback
  187. ;    MessageBox MB_YESNO '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}$\n$\nContinue?' IDYES +2
  188. ;    StrCpy $0 StopGetDrives
  189.  
  190.     Push $0
  191. FunctionEnd
  192.  
  193.  
  194. Section GetTime
  195.     ${StackVerificationStart} GetTime
  196.  
  197.     ${GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
  198.  
  199.     ${StackVerificationEnd}
  200. SectionEnd
  201.  
  202.  
  203. Section GetFileAttributes
  204.     ${StackVerificationStart} GetFileAttributes
  205.  
  206.     ${GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
  207.  
  208.     ${StackVerificationEnd}
  209. SectionEnd
  210.  
  211.  
  212. Section GetFileVersion
  213.     ${StackVerificationStart} GetFileVersion
  214.  
  215.     ${GetFileVersion} '$WINDIR\explorer.exe' $OUT1
  216.  
  217.     ${StackVerificationEnd}
  218. SectionEnd
  219.  
  220.  
  221. Section GetExeName
  222.     ${StackVerificationStart} GetExeName
  223.  
  224.     ${GetExeName} $OUT1
  225.  
  226.     ${StackVerificationEnd}
  227. SectionEnd
  228.  
  229.  
  230. Section GetExePath
  231.     ${StackVerificationStart} GetExePath
  232.  
  233.     ${GetExePath} $OUT1
  234.  
  235.     ${StackVerificationEnd}
  236. SectionEnd
  237.  
  238.  
  239. Section GetParameters
  240.     ${StackVerificationStart} GetParameters
  241.  
  242.     ${GetParameters} $OUT1
  243.  
  244.     ${StackVerificationEnd}
  245. SectionEnd
  246.  
  247.  
  248. Section GetOptions
  249.     ${StackVerificationStart} GetOptions
  250.  
  251.     ${GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  252.     StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
  253.  
  254.     ${GetOptions} '-TMP=temp.tmp -INSTDIR="C:/Program Files/Common Files" -SILENT=yes' '-INSTDIR=' $OUT1
  255.     StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
  256.  
  257.     ${GetOptions} "/INSTDIR='C:/Program Files/Common Files' /SILENT=yes" '/INSTDIR=' $OUT1
  258.     StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
  259.  
  260.     StrCpy $OUT1 '/INSTDIR=`C:/Program Files/Common Files` /SILENT=yes'
  261.     ${GetOptions} '$OUT1' '/INSTDIR=' $OUT1
  262.     StrCmp $OUT1 'C:/Program Files/Common Files' 0 error
  263.  
  264.     ${GetOptions} '/SILENT=yes /INSTDIR=C:\Program Files\Common Files' '/INSTDIR=' $OUT1
  265.     StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
  266.  
  267.     ${GetOptions} "/INSTDIR=common directory: 'C:\Program Files\Common Files' /SILENT=yes" '/INSTDIR=' $OUT1
  268.     StrCmp $OUT1 "common directory: 'C:\Program Files\Common Files'" 0 error
  269.  
  270.     ${GetOptions} '/INSTDIR=WxxxW /SILENT=yes' '/INSTDIR=' $OUT1
  271.     StrCmp $OUT1 'WxxxW' 0 error
  272.  
  273.     ${GetOptions} "/Prm='/D=True' /D=1" '/D=' $OUT1
  274.     StrCmp $OUT1 "1" 0 error
  275.  
  276.     ${GetOptions} "/D=1 /Prm='/D=True'" '/Prm=' $OUT1
  277.     StrCmp $OUT1 "/D=True" 0 error
  278.  
  279.     ${GetOptions} `/D=1 /Prm='/D="True" /S="/Temp"'` '/Prm=' $OUT1
  280.     StrCmp $OUT1 '/D="True" /S="/Temp"' 0 error
  281.  
  282.     ${GetOptions} `/INSTDIR='"C:/Program Files/Common Files"' /SILENT=yes` '/INSTDIR=' $OUT1
  283.     StrCmp $OUT1 '"C:/Program Files/Common Files"' 0 error
  284.  
  285.     ${GetOptions} `/INSTDIR='"C:/Program Files/Common Files"' /SILENT=yes` '/INSTDIR*=' $OUT1
  286.     IfErrors 0 error
  287.     StrCmp $OUT1 '' 0 error
  288.  
  289.     ${GetOptions} `/INSTDIR="C:/Program Files/Common Files" /SILENT=yes` '' $OUT1
  290.     IfErrors 0 error
  291.     StrCmp $OUT1 '' 0 error
  292.  
  293.     ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT' '/SILENT' $OUT1
  294.     IfErrors error
  295.     StrCmp $OUT1 '' 0 error
  296.  
  297.     goto +2
  298.     error:
  299.     SetErrors
  300.  
  301.     ${StackVerificationEnd}
  302. SectionEnd
  303.  
  304.  
  305. Section GetOptionsS
  306.     ${StackVerificationStart} GetOptionsS
  307.  
  308.     ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  309.     IfErrors error
  310.     StrCmp $OUT1 'C:\Program Files\Common Files' 0 error
  311.  
  312.     ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/Instdir=' $OUT1
  313.     IfErrors 0 error
  314.     StrCmp $OUT1 '' 0 error
  315.  
  316.     ${GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT' '/SILENT' $OUT1
  317.     IfErrors error
  318.     StrCmp $OUT1 '' 0 error
  319.  
  320.     goto +2
  321.     error:
  322.     SetErrors
  323.  
  324.     ${StackVerificationEnd}
  325. SectionEnd
  326.  
  327.  
  328. Section GetRoot
  329.     ${StackVerificationStart} GetRoot
  330.  
  331.     ${GetRoot} 'C:\Program Files\NSIS' $OUT1
  332.     StrCmp $OUT1 'C:' 0 error
  333.  
  334.     ${GetRoot} '\\SuperPimp\NSIS\Source\exehead\Ui.c' $OUT1
  335.     StrCmp $OUT1 '\\SuperPimp\NSIS' 0 error
  336.  
  337.     ${GetRoot} '\\Program Files\NSIS' $OUT1
  338.     StrCmp $OUT1 '\\Program Files\NSIS' 0 error
  339.  
  340.     ${GetRoot} '\\Program Files\NSIS\' $OUT1
  341.     StrCmp $OUT1 '\\Program Files\NSIS' 0 error
  342.  
  343.     ${GetRoot} '\\Program Files\NSIS\Source\exehead\Ui.c' $OUT1
  344.     StrCmp $OUT1 '\\Program Files\NSIS' 0 error
  345.  
  346.     ${GetRoot} '\Program Files\NSIS' $OUT1
  347.     StrCmp $OUT1 '' 0 error
  348.  
  349.     goto +2
  350.     error:
  351.     SetErrors
  352.  
  353.     ${StackVerificationEnd}
  354. SectionEnd
  355.  
  356.  
  357. Section GetParent
  358.     ${StackVerificationStart} GetParent
  359.  
  360.     ${GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  361.     StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
  362.  
  363.     ${GetParent} 'C:\Program Files\Winamp\plugins' $OUT1
  364.     StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
  365.  
  366.     ${GetParent} 'C:\Program Files\Winamp\plugins\' $OUT1
  367.     StrCmp $OUT1 'C:\Program Files\Winamp' 0 error
  368.  
  369.     ${GetParent} 'C:\' $OUT1
  370.     StrCmp $OUT1 '' 0 error
  371.  
  372.     goto +2
  373.     error:
  374.     SetErrors
  375.  
  376.     ${StackVerificationEnd}
  377. SectionEnd
  378.  
  379.  
  380. Section GetFileName
  381.     ${StackVerificationStart} GetFileName
  382.  
  383.     ${GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  384.     StrCmp $OUT1 'uninstwa.exe' 0 error
  385.  
  386.     ${GetFileName} 'uninstwa.exe' $OUT1
  387.     StrCmp $OUT1 'uninstwa.exe' 0 error
  388.  
  389.     ${GetFileName} 'C:\Program Files\Winamp\plugins' $OUT1
  390.     StrCmp $OUT1 'plugins' 0 error
  391.  
  392.     ${GetFileName} 'C:\Program Files\Winamp\plugins\' $OUT1
  393.     StrCmp $OUT1 'plugins' 0 error
  394.  
  395.     goto +2
  396.     error:
  397.     SetErrors
  398.  
  399.     ${StackVerificationEnd}
  400. SectionEnd
  401.  
  402.  
  403. Section GetBaseName
  404.     ${StackVerificationStart} GetBaseName
  405.  
  406.     ${GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  407.     StrCmp $OUT1 'uninstwa' 0 error
  408.  
  409.     ${GetBaseName} 'uninstwa.exe' $OUT1
  410.     StrCmp $OUT1 'uninstwa' 0 error
  411.  
  412.     ${GetBaseName} 'C:\Program Files\Winamp\plugins' $OUT1
  413.     StrCmp $OUT1 'plugins' 0 error
  414.  
  415.     ${GetBaseName} 'C:\Program Files\Winamp\plugins\' $OUT1
  416.     StrCmp $OUT1 '' 0 error
  417.  
  418.     goto +2
  419.     error:
  420.     SetErrors
  421.  
  422.     ${StackVerificationEnd}
  423. SectionEnd
  424.  
  425.  
  426. Section GetFileExt
  427.     ${StackVerificationStart} GetFileExt
  428.  
  429.     ${GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  430.     StrCmp $OUT1 'exe' 0 error
  431.  
  432.     ${GetFileExt} 'uninstwa.exe' $OUT1
  433.     StrCmp $OUT1 'exe' 0 error
  434.  
  435.     ${GetFileExt} 'C:\Program Files\Winamp\plugins' $OUT1
  436.     StrCmp $OUT1 '' 0 error
  437.  
  438.     ${GetFileExt} 'C:\Program Files\Winamp\plugins\' $OUT1
  439.     StrCmp $OUT1 '' 0 error
  440.  
  441.     goto +2
  442.     error:
  443.     SetErrors
  444.  
  445.     ${StackVerificationEnd}
  446. SectionEnd
  447.  
  448.  
  449. Section BannerTrimPath
  450.     ${StackVerificationStart} BannerTrimPath
  451.  
  452.     ${BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
  453.     StrCmp $OUT1 'C:\Server\...\Terminal\license.htm' 0 error
  454.  
  455.     ${BannerTrimPath} 'C:\12\3456\789' '3A' $OUT1
  456.     StrCmp $OUT1 '' 0 error
  457.  
  458.     ${BannerTrimPath} 'C:\12\3456\789' '4A' $OUT1
  459.     StrCmp $OUT1 'C...' 0 error
  460.  
  461.     ${BannerTrimPath} 'C:\12\3456\789' '11A' $OUT1
  462.     StrCmp $OUT1 'C:\12\...' 0 error
  463.  
  464.     ${BannerTrimPath} 'C:\12\3456\789' '13A' $OUT1
  465.     StrCmp $OUT1 'C:\12\...\789' 0 error
  466.  
  467.     ${BannerTrimPath} 'C:\12\3456\789' '14A' $OUT1
  468.     StrCmp $OUT1 'C:\12\3456\789' 0 error
  469.  
  470.     ${BannerTrimPath} 'C:\12\3456\789' '14A' $OUT1
  471.     StrCmp $OUT1 'C:\12\3456\789' 0 error
  472.  
  473.     ${BannerTrimPath} 'C:\12\3456\789' '11B' $OUT1
  474.     StrCmp $OUT1 'C:\12\...' 0 error
  475.  
  476.     ${BannerTrimPath} 'C:\12\3456\789' '5B' $OUT1
  477.     StrCmp $OUT1 'C:...' 0 error
  478.  
  479.     ${BannerTrimPath} 'C:\12\3456\789' '5B' $OUT1
  480.     StrCmp $OUT1 'C:...' 0 error
  481.  
  482.     ${BannerTrimPath} 'C:\12\3456\789' '11C' $OUT1
  483.     StrCmp $OUT1 'C:\12\34...' 0 error
  484.  
  485.     ${BannerTrimPath} 'C:\12\3456\789' '9D' $OUT1
  486.     StrCmp $OUT1 'C:\12\...' 0 error
  487.  
  488.     ${BannerTrimPath} 'C:\12\3456\789' '10D' $OUT1
  489.     StrCmp $OUT1 'C:\...\789' 0 error
  490.  
  491.     ${BannerTrimPath} 'C:\12\3456\789' '11D' $OUT1
  492.     StrCmp $OUT1 'C:\1...\789' 0 error
  493.  
  494.     ${BannerTrimPath} '123456789' '5D' $OUT1
  495.     StrCmp $OUT1 '12...' 0 error
  496.  
  497.     goto +2
  498.     error:
  499.     SetErrors
  500.  
  501.     ${StackVerificationEnd}
  502. SectionEnd
  503.  
  504.  
  505. Section DirState
  506.     ${StackVerificationStart} DirState
  507.  
  508.     ${DirState} '$TEMP' $OUT1
  509.  
  510.     ${StackVerificationEnd}
  511. SectionEnd
  512.  
  513.  
  514. Section RefreshShellIcons
  515.     ${StackVerificationStart} RefreshShellIcons
  516.  
  517.     ${RefreshShellIcons}
  518.  
  519.     ${StackVerificationEnd}
  520. SectionEnd
  521.  
  522.  
  523. Section WriteUninstaller
  524.     goto +2
  525.     WriteUninstaller '$EXEDIR\un.FileFuncTest.exe'
  526. SectionEnd
  527.  
  528.  
  529.  
  530. ;############### UNINSTALL ###############
  531.  
  532. Section un.Uninstall
  533.     ${un.Locate} '$DOCUMENTS' '/L=FD /M=*.* /S=0B /G=0' 'un.LocateCallback'
  534.     ${un.GetSize} '$WINDIR' '/M=Explorer.exe /S=0K /G=0' $OUT1 $OUT2 $OUT3
  535.     ${un.DriveSpace} 'C:\' '/D=F /S=M' $OUT1
  536.     ${un.GetDrives} 'FDD+CDROM' 'un.GetDrivesCallback'
  537.     ${un.GetTime} '' 'L' $OUT1 $OUT2 $OUT3 $OUT4 $OUT5 $OUT6 $OUT7
  538.     ${un.GetFileAttributes} '$WINDIR\explorer.exe' 'ALL' $OUT1
  539.     ${un.GetFileVersion} '$WINDIR\explorer.exe' $OUT1
  540.     ${un.GetExeName} $OUT1
  541.     ${un.GetExePath} $OUT1
  542.     ${un.GetParameters} $OUT1
  543.     ${un.GetOptions} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  544.     ${un.GetOptionsS} '/INSTDIR=C:\Program Files\Common Files /SILENT=yes' '/INSTDIR=' $OUT1
  545.     ${un.GetRoot} 'C:\Program Files\NSIS' $OUT1
  546.     ${un.GetParent} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  547.     ${un.GetFileName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  548.     ${un.GetBaseName} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  549.     ${un.GetFileExt} 'C:\Program Files\Winamp\uninstwa.exe' $OUT1
  550.     ${un.BannerTrimPath} 'C:\Server\Documents\Terminal\license.htm' '35A' $OUT1
  551.     ${un.DirState} '$TEMP' $OUT1
  552.     ${un.RefreshShellIcons}
  553. SectionEnd
  554.  
  555. Function un.LocateCallback
  556.     Push $0
  557. FunctionEnd
  558.  
  559. Function un.GetDrivesCallback
  560.     Push $0
  561. FunctionEnd
  562.